package com.ujoku.controller.admin;

import com.labillusion.core.platform.web.rest.RESTController;
import com.ujoku.domain.Country;
import com.ujoku.service.CountryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by suggestion on 2015/1/30.
 */
@Controller
public class CountryMngController extends RESTController {
    @Autowired
    private CountryService countryService;

    @RequestMapping(value = "/uj-admin/country/list" , method = RequestMethod.GET)
    @ResponseBody
    public List<Country> list(){
        List<Country> countryList = countryService.selectList();

        return countryList;
    }
}
